package com.zjhb.entity;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

import com.zjhb.common.controller.ExcelIgnore;
import com.zjhb.common.util.StringMyUtil;


@javax.persistence.Entity
@javax.persistence.Table(name = "assets", schema = "army", catalog = "")
public class AssetsEntity {
	@ExcelIgnore
	private String id;
	private String name;
	@ExcelIgnore
	private String departId;
	private String departName;
	@ExcelIgnore
	private String areaId;
	private String areaName;
	@ExcelIgnore
	private String createTime;
	private String value;
	@ExcelIgnore
	private String keepId;
	@ExcelIgnore
	private String createUser;
	@ExcelIgnore
	private Integer allCount;
	@ExcelIgnore
	private Integer used;
	@ExcelIgnore
	private Integer losed;
	private String code;
	@ExcelIgnore
	private String codeUrl;
	@ExcelIgnore
	private String number;
	@ExcelIgnore
	private String status;
	private String statusDesc;
	private String toTime;

	@javax.persistence.Basic
	@javax.persistence.Column(name = "to_time")
	public String getToTime() {
		return StringMyUtil.dateTimeSplit(toTime);			
	}

	public void setToTime(String toTime) {
		this.toTime = toTime;
	}

	@Transient
	public String getStatusDesc() {
		return statusDesc;
	}

	public void setStatusDesc(String statusDesc) {
		this.statusDesc = statusDesc;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "status")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Transient
	public String getAreaName() {
		return areaName;
	}

	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "code")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "code_url")
	public String getCodeUrl() {
		return codeUrl;
	}

	public void setCodeUrl(String codeUrl) {
		this.codeUrl = codeUrl;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "number")
	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name = "ID")
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "depart_id")
	public String getDepartId() {
		return departId;
	}

	public void setDepartId(String departId) {
		this.departId = departId;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "depart_name")
	public String getDepartName() {
		return departName;
	}

	public void setDepartName(String departName) {
		this.departName = departName;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "area_id")
	public String getAreaId() {
		return areaId;
	}

	public void setAreaId(String areaId) {
		this.areaId = areaId;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "create_time")
	public String getCreateTime() {
		return StringMyUtil.dateTimeSplit(createTime);
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "value")
	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "keep_id")
	public String getKeepId() {
		return keepId;
	}

	public void setKeepId(String keepId) {
		this.keepId = keepId;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "create_user")
	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "all_count")
	public Integer getAllCount() {
		return allCount;
	}

	public void setAllCount(Integer allCount) {
		this.allCount = allCount;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "used")
	public Integer getUsed() {
		return used;
	}

	public void setUsed(Integer used) {
		this.used = used;
	}

	@javax.persistence.Basic
	@javax.persistence.Column(name = "losed")
	public Integer getLosed() {
		return losed;
	}

	public void setLosed(Integer losed) {
		this.losed = losed;
	}

	// @Override
	// public boolean equals(Object o) {
	// if (this == o)
	// return true;
	// if (o == null || getClass() != o.getClass())
	// return false;
	// AssetsEntity that = (AssetsEntity) o;
	// return Objects.equals(id, that.id) && Objects.equals(name, that.name)
	// && Objects.equals(departmentId, that.departmentId)
	// && Objects.equals(departmentName, that.departmentName) &&
	// Objects.equals(areaId, that.areaId)
	// && Objects.equals(createTime, that.createTime) && Objects.equals(value,
	// that.value)
	// && Objects.equals(keepId, that.keepId) && Objects.equals(createUser,
	// that.createUser)
	// && Objects.equals(count, that.count) && Objects.equals(using, that.using)
	// && Objects.equals(lose, that.lose);
	// }
	//
	// @Override
	// public int hashCode() {
	//
	// return Objects.hash(id, name, departmentId, departmentName, areaId,
	// createTime, value, keepId, createUser,
	// count, using, lose);
	// }
}
